package edu.whu.entity;

import lombok.Data;


import javax.persistence.*;
import java.util.List;

@Data
@Entity(name = "t_user")
public class User {
    @Id
    String username;
    String password;

    @ManyToMany(fetch = FetchType.EAGER, cascade = CascadeType.REFRESH)
    private List<Role> roles = new java.util.ArrayList<>();

}
